package com.lemon.reggie.service;

import com.lemon.reggie.pojo.dto.DefaultAddressBookDTO;
import com.lemon.reggie.pojo.dto.EditAddressBookDTO;
import com.lemon.reggie.pojo.dto.SaveAddressBookDTO;
import com.lemon.reggie.pojo.entity.AddressBook;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lemon.reggie.pojo.vo.AddressBookVO;

import java.util.List;

/**
 * <p>
 * 地址管理 服务类
 * </p>
 *
 * @author Lemon
 * @since 2022-05-23
 */
public interface AddressBookService extends IService<AddressBook> {

    /**
     * 添加地址
     * @param saveAddressBookDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/21
     */
    void saveAddressBook(SaveAddressBookDTO saveAddressBookDTO);

    /**
     * 登录用户地址集合
     * @return java.util.List<com.lemon.reggie.pojo.vo.AddressBookVO>
     * @author Guannankun
     * @since 2022/8/21
     */
    List<AddressBookVO> listAddressBook();

    /**
     * 根据id获取地址
     * @param id
     * @return com.lemon.reggie.pojo.vo.AddressBookVO
     * @author Guannankun
     * @since 2022/8/21
     */
    AddressBookVO getAddressBookVO(Long id);

    /**
     * 设置默认地址
     * @param defaultAddressBookDTO
     * @return AddressBookVO
     * @author Guannankun
     * @since 2022/8/21
     */
    AddressBookVO defaultAddressBook(DefaultAddressBookDTO defaultAddressBookDTO);

    /**
     * 修改地址
     * @param editAddressBookDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/21
     */
    void editAddressBook(EditAddressBookDTO editAddressBookDTO);

    /**
     * 删除地址
     * @param ids
     * @return void
     * @author Guannankun
     * @since 2022/8/21
     */
    void deleteAddressBook(List<Long> ids);

    /**
     * 获取当前用户的默认地址
     * @return com.lemon.reggie.pojo.vo.AddressBookVO
     * @author Guannankun
     * @since 2022/8/29
     */
    AddressBookVO getUserDefault();

}
